<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="root">
        {{date | formattedTime('YYYY-MM-DD')}}
    </div>
    <script src="../js/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/dayjs/1.10.7/dayjs.min.js"></script>
    <script>
        new Vue({
            el: '#root',
            data: {
                date: Date.now(),
                xx: 1
            },
            filters: {
                formattedTime(time, str) {
                return dayjs(time).format(str)
                }
            },
            
        })
    </script>
</body>
</html>